package rsb.animal;
public abstract class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public abstract void shout();

}
class Cat extends Animal{
    public Cat(String name) {
        super(name);
    }

    @Override
    public void shout() {
        System.out.println("喵喵叫~~~~~~");
    }


}
class Dog extends Animal{
    public Dog(String name) {
        super(name);
    }

    @Override
    public void shout() {
        System.out.println("汪汪汪~~~~~~~");
    }
}




